'\" te
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH CURS_INCH 3CURSES "Dec 31, 1996"
.SH NAME
curs_inch, inch, winch, mvinch, mvwinch \- get a character and its attributes
from a curses window
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR ... ]
#include <curses.h>

\fBchtype\fR \fBinch\fR(\fBvoid\fR);
.fi

.LP
.nf
\fBchtype\fR \fBwinch\fR(\fBWINDOW *\fR\fIwin\fR);
.fi

.LP
.nf
\fBchtype\fR \fBmvinch\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR);
.fi

.LP
.nf
\fBchtype\fR \fBmvwinch\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR);
.fi

.SH DESCRIPTION
.sp
.LP
With these routines, the character, of type \fBchtype\fR, at the current
position in the named window is returned. If any attributes are set for that
position, their values are OR-ed into the value returned. Constants defined in
\fB<curses.h>\fR can be used with the logical AND (\fB&\fR) operator to extract
the character or attributes alone.
.SS "Attributes"
.sp
.LP
The following bit-masks can be AND-ed with characters returned by
\fBwinch()\fR.
.sp
.ne 2
.na
\fBA_CHARTEXT\fR
.ad
.RS 16n
Bit-mask to extract character
.RE

.sp
.ne 2
.na
\fBA_ATTRIBUTES\fR
.ad
.RS 16n
Bit-mask to extract attributes
.RE

.sp
.ne 2
.na
\fBA_COLOR\fR
.ad
.RS 16n
Bit-mask to extract color-pair field information
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	Unsafe
.TE

.SH SEE ALSO
.sp
.LP
.BR curses (3CURSES),
.BR attributes (7)
.SH NOTES
.sp
.LP
The header <\fBcurses.h\fR> automatically includes the headers  <\fBstdio.h\fR>
and <\fBunctrl.h\fR>.
.sp
.LP
Note that all of these routines may be macros.
